<template>
  <div class='container'>
    <h1>{{previewInfo.title}}</h1>
    <div>
      <span>{{previewInfo.createTime | parseTimeByString("{y}-{m}-{d}")}}</span>
      <span>{{previewInfo.username}}</span>
      <span><i class="el-icon-view"></i>{{previewInfo.visits}}</span>
    </div>
    <div class="content" v-html="previewInfo.articleBody">

    </div>
  </div>
</template>

<script>
export default {
  props: {
    previewInfo: {
      type: Object,
      required: true
    }
  }
}
</script>

<style scoped lang='less'>
span{
  margin: 0 3px;
}
.content{
  margin-top: 30px;
  width: 100%;
  padding: 10px;
  background-color: #f5f5f5;
}</style>
